Machine-to-machine communications (M2M for short hereinafter) is a networked application and service centering on intelligent machine-to-machine interaction. By embedding a wireless or wired communications module and application processing logic in a machine, the M2M implements data communication without manual intervention. In this manner, information requirements of users in aspects of monitoring, commanding and scheduling, data collection and measurement, and the like are met. In a conventional typical M2M application network architecture, various M2M terminals (such as a sensor and a microcontroller) access an M2M service platform directly or remotely by using an M2M gateway, while various M2M applications (such as electricity meter reading and intelligent traffic) retrieve, with a service capability provided by the M2M service platform, data collected by the M2M terminals, or perform remote control and management on the M2M terminals.
The European Telecommunications Standards Institute (ETSI) M2M uses a RESTful architecture. REST, an acronym for Representational State Transfer, means “representational state transfer”. If an architecture is based on REST, the architecture is referred to as a RESTful architecture. Its characteristic is that everything is made up of resources, where a resource is a text segment existing in a network or is in multiple other media forms. Each resource has a unique uniform resource identifier (URI). An application program or service capability middleware may access the resource using the URI. Each resource is accessed in fixed manners, including manners such as create, update, delete, and retrieve. In addition, in the RESTful architecture, a client and a server are both stateless.
In an M2M system, the following scenario exists extensively. When a status of a device changes, another device or multiple devices may perform a single operation or a series of operations according to whether the change meets a condition. The action of foregoing operation triggering is implemented by an application program installed on a specific device (such as a device that directly performs the operations). However, in some restricted environments, the device needs to go to sleep periodically, and the application program is interrupted as the device goes to sleep. Consequently, operations between resources cannot be triggered. In some scenarios in which the device needs to be offline and used outdoors, a service of the application program is interrupted as the device is offline. Therefore, in the M2M system, operation triggering using the application program suffers from a disadvantage of poor stability.